<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     <!-- 1. 声明一个变量per, 类型为对象类型
    2. 该对象的属性为性别,年龄,爱好(3个)
    3. 该对象的方法有 说话, 吃饭(2个)
    4. 在控制台分别调用该对象的属性和方法 -->

    <script>
        let xxm = {
				gender: "z",
				age: 18,
				hobby: "cs",
				speak: function () {
					console.log(`我的爱好是：${this.hobby}`);
				},
				eat: function () {
					console.log(`ok`);
				},
			};
			console.log(per.gender + " ");
			console.log(per.age + " ");
			console.log(per.hobby + " ");
			xxm.speak();
			xxm.eat();
    </script>
</body>
</html>